<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class BaseDetail extends Model
{
    public $timestamps = false;
    protected $connection = 'xz';
    protected $table = 'base_detail';
    use HasFactory;

    const SITUATION = [ '1' => '目前正在找工作', '2' => '观望有好机会会考虑', '3' => '我目前不想换工作'];

    /**
     *  获取日期.
     *
     * @param string $value
     * @return string
     */
    public function getCreateTimeAttribute(string $value)
    {
        return Date("Y-m-d H:i:s",$value);
    }

    /**
     *  获取出生.
     *
     * @param string $value
     * @return string
     */
    public function getBirthdayAttribute(string $value)
    {
        return Date("Y-m-d H:i:s",$value);
    }
    
    public function workExpect()
    {
        return $this->hasOne('App\Models\WorkExpect','uid','uid');
    }
}
